bpo-37207: Use PEP 590 vectorcall to speed up set()#19019
bpo-37207: Use PEP 590 vectorcall to speed up set()#19019vstinner merged 2 commits intopython:masterfrom
Conversation
vstinner
left a comment
There was a problem hiding this comment.
When doing benchmarks, you can use two Python binaries and use pyperf timeit --compare-to=REF_PYTHON_BINARY (...). It checks that the difference is significant.
https://pyperf.readthedocs.io/en/latest/cli.html#pyperf-timeit
Or you can store results in JSON files and use pyperf compare_to command.
|
I merged PR #18980, please rebase your PR on top of master and modify your PR to use _PyArg_NoKwnames(). |
|
IMHO it's worth it to add a few lines of C code to make tuple() and set() constructors faster. |
Yeah, I think the PEP 590 implemented very well to bring performance enhancement very easily. |
What I mean is that vectorcall should not be used for everything. But set() and tuple() are very commonly used, so here it's worth it. |
PEP 590
Master
https://bugs.python.org/issue37207